package multiple.dao;

import org.apache.ibatis.annotations.Select;
import pojo.Role;

import java.util.List;

/**
 * @author Feuler
 * @since 2020/11/11
 **/

public interface RoleMapper {

    /**
     * 根据用户id查询用户角色信息
     *
     * @param uid 用户id
     * @return 结果集
     */
    @Select("select * from sys_role r, sys_user_role ur where r.id = ur.roleId and ur.userId = #{uid}")
    List<Role> findRoleByUid(Integer uid);
}
